<script type="text/html" template lay-done="layui.data.sendParams(d.params)">
<div class="fromPage">
    <form class="layui-form layui-form-pane" lay-filter="LAY-system-role-form">
        <div class="layui-form-item">
            <label class="layui-form-label must">名称</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" name="name" lay-verify="required" lay-vertype="tips" placeholder="如: admin">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label must">显示名称</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" name="display_name" lay-verify="required" lay-vertype="tips" placeholder="如：管理员">
            </div>
        </div>
    </form>
</div>
</script>
<script>
    layui.data.sendParams = function(params){
        const mode = params.mode, fromData = params.data;
        layui.use('form', function (){
            const form = layui.form;
            if (mode === 'edit'){
                form.val('LAY-system-role-form', fromData);
            }
        })
    }
</script>
